<script setup>
import { http} from '@/utils/http.js'
import { useCounterStore } from '../../stores/counter';

const counterStore = useCounterStore();

uni.utils.toast()
function onButionClick(){
	
	
	http.request({
		url:'/articles/all/?style=表白墙&page=1',
		header: {
			Authorization: '13432'
		},
		custom: {
			loading: true,
			loadingText: '神仙来了...',
		}
	}).then(res=>{
		console.log(res)
	})
}
</script>


<template>
	<view>
		<button @click="onButionClick" type='default'> 测试请求</button>
		<button class="button" type="primary" @click="counterStore.decrement"> -</button>
		<input class="input" :value="counterStore.$state.count">
		<button class="button" type="primary" @click="counterStore.increment"> +</button>
		<text> {{counterStore.$state.name}}</text>
	</view>
</template>



<style>

</style>
